#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <cmath>

void main()
{
	int n, check, x, y, k, i;
	double pi;
	srand(time(0));
	check=scanf("%d", &n);
	if (check!= 1){
		printf("vse ploxo\n");
		return;
	}
	k=0;
	for (i=0; i<n; i++)
	{
		x=rand();
		y=rand();
		if (x*x+y*y<=RAND_MAX*RAND_MAX) 
		{
			k++;
		}
	}
	pi=4.0*k/n;
	printf("%f\n", pi);
	system ("PAUSE");
}